package cn.toma.config.web;

import cn.toma.common.converter.EnumConvertFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: zqx
 * @Date: 2019-08-02 15:12
 * @Description:
 */
@Configuration
public class WebConfig implements WebMvcConfigurer
{

	/**
	 * 注册转换器注册工厂
	 *
	 * @param registry
	 */
	@Override
	public void addFormatters(FormatterRegistry registry)
	{
		registry.addConverterFactory(new EnumConvertFactory());
	}
}
